<?php

namespace App\Models\Admin;

use App\Framework\Config\SystemConstant;
use Illuminate\Database\Eloquent\Model;

class Manager extends Model
{
    //设置数据库连接
    protected $connection = SystemConstant::RZJHPADMIN_CONNECTION;
    //设置主键
    protected $primaryKey = 'manager_id';
    //设置表名称
    protected $table = 'manager';
    //设置字段黑名单
    protected $guarded = [];
    //设置隐藏字段
    protected $hidden = ['password', 'deal_password', 'salt'];
    //不设置时间戳
    public $timestamps=false;
    //配置管理员角色关联表
    public function role()
    {
        return $this->hasOne('App\Models\Admin\ManagerRole','manager_role_id','manager_role_id');
    }
}
